<!--
  ~ This program is part of the OpenLMIS logistics management information system platform software.
  ~ Copyright © 2013 VillageReach
  ~
  ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  ~  
  ~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
  ~ You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses.  For additional information contact info@OpenLMIS.org. 
  -->
<form name="newRegimenForm">
  <div id="newRegimenForm" class="regimenForm">
    <div class="app-form">
      <div class="form-group clearfix">
        <h3 openlmis-message="label.new.regimen"></h3>

        <div class="form-cell">
          <label for="newRegimenCategory">
            <span openlmis-message="label.regimen.category"></span>
            <span class="label-required"> *</span>
          </label>

          <div class="form-field">
            <select id="newRegimenCategory" ng-model="newRegimen.category"
                    ng-options="regimenCategory as regimenCategory.name for regimenCategory in regimenCategories"
                    ng-class="highlightRequired(newRegimen.category)">
              <option value="" openlmis-message="placeholder.select.category"></option>
            </select>
          </div>
        </div>
        <div class="form-cell">
          <label for="newRegimenCode">
            <span openlmis-message="header.code"></span>
            <span class="label-required"> *</span>
          </label>

          <div class="form-field">
            <input type="text" id="newRegimenCode" name="newRegimenCode" ng-model="newRegimen.code"
                   ng-class="highlightRequired(newRegimen.code)" maxlength="50"/>
          </div>
        </div>
        <div class="form-cell">
          <label for="newRegimenName">
            <span openlmis-message="header.name"></span>
            <span class="label-required"> *</span>
          </label>

          <div class="form-field">
            <input type="text" id="newRegimenName" name="newRegimenName" ng-model="newRegimen.name"
                   ng-class="highlightRequired(newRegimen.name)" maxlength="50"/>
          </div>
        </div>
        <div class="form-cell">
          <div class="form-field">
            <input type="checkbox" id="newRegimenActive" name="newRegimenActive" ng-model="newRegimen.active"
                   ng-class="highlightRequired(newRegimen.active)"/>
            <label for="newRegimenActive" openlmis-message="label.active"></label>
          </div>
        </div>
      </div>
      <div class="alert alert-error" id="addFailMessage" openlmis-message="newRegimenError"
           ng-show="newRegimenError"></div>
      <div>
        <input type="button" class="btn btn-primary" id="addNewRegimen" openlmis-message="button.add"
               ng-click="addNewRegimen()"/>
      </div>
    </div>
  </div>
</form>